package com.skirmisher.video.aliVideo;

import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.profile.DefaultProfile;
import com.skirmisher.video.entity.frame.AliPropertiesEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName BaseAliVideo
 * @Description TODO 阿里视频监控基础类
 * @Author hanwangxin
 * @Date 2020/11/7 5:52 下午
 * @Version 1.0
 */
@Service
public class BaseAliVideo {


    @Autowired
    private AliPropertiesEntity aliPropertiesEntity;

    protected IAcsClient getClient(){
        DefaultProfile defaultProfile =  DefaultProfile.getProfile(aliPropertiesEntity.getRegionId(), aliPropertiesEntity.getAccessKeyId()
                , aliPropertiesEntity.getAccessKeySecret());

        return  new DefaultAcsClient(defaultProfile);
    }
}
